home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #3 / Amiga Plus CD - 2002 - No. 03.iso / AmigaPlus / AmigaOS / Aplus_Dev / AP-Website / links / out.php < prev    next >
Encoding:
PHP Script  |  2002-10-28  |  687 b   |  42 lines

  1. <?
  2. // *******************************************************************
  3. //  out.php
  4. // *******************************************************************
  5.  
  6. include("./include/config.php");
  7. include("./include/functions.php");
  8.  
  9. if(isset($ID)){
  10.  
  11.     $get_site = sql_query("
  12.         select
  13.             SiteURL,
  14.             OutIP
  15.         from
  16.             $tb_links
  17.         where
  18.             ID='$ID'
  19.     ");
  20.  
  21.     $get_row = sql_fetch_array($get_site);
  22.     $url = $get_row[SiteURL];
  23. }
  24.  
  25. if($REMOTE_ADDR != $get_row[OutIP]){
  26.     
  27.     $result = sql_query("
  28.         update
  29.             $tb_links
  30.         set
  31.             HitsOut = HitsOut + 1,
  32.             OutIP = '$REMOTE_ADDR',
  33.             LastUpdate = LastUpdate
  34.         where
  35.             ID = '$ID'
  36.     ");
  37. }
  38.  
  39. header("Location: $url");
  40.  
  41. ?>
  42.